<template>
  <div>
    <div class="detail_main">
      <div class="detail_top">
        <h2>备注</h2>
      </div>
      <div class="detail_containter" style="height:60px">
        <FormPanel ref="FormPanel4" :list="formList" formType="add" :isSubmitBtn="false" :labelWidth="85" :cols="3" @formChange="changeHandle" />
      </div>
    </div>
    <div
      :style="{
        textAlign: 'right'
      }"
    >
      <el-button @click="confirmHandle">确 定</el-button>
      <el-button @click="closeDialog">取 消</el-button>
    </div>
  </div>
</template>
<script>
import { dictionary } from '@/utils/dictMixin';
export default {
  mixins: [dictionary],
  data() {
    return {
      formList: this.createTop(),
      fromData: {}
    };
  },
  methods: {
    createTop() {
      return [
        {
          type: 'TEXT_AREA',
          label: '备注',
          fieldName: 'REMARK'
        }
      ];
    },
    changeHandle(val) {
      console.log(val);
      this.fromData = val;
    },

    confirmHandle() {
      this.$refs.FormPanel.SUBMIT_FORM();

      let data = Object.assign({}, this.fromData);
      console.log(data);
    },
    closeDialog() {
      this.$emit('closeOwnerFun', false);
    }
  }
};
</script>
<style lang="less" scoped>
.detail_main {
  border: 1px solid #ebeef5;
  margin-bottom: 10px;
  .detail_top {
    background: #f2f2f2;
    border-bottom: 1px solid #ebeef5;
    height: 25px;
    line-height: 25px;
    padding: 0 10px;
  }
  .detail_containter {
    padding-top: 10px;
  }
}
</style>
